<!DOCTYPE html><html lang="zh-CN" data-theme="dark"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Flutter快捷键Mac | Albert Yuan's Blog</title><meta name="keywords" content="Flutter"><meta name="author" content="Albert Yuan"><meta name="copyright" content="Albert Yuan"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#0d0d0d"><meta name="referrer" content="no-referrer"><meta name="description" content="Keymap中文文件乱码Android Studio -&gt; Preferences -&gt; Appearance &amp; Behavior -&gt; Appearance -&gt; Use custom font -&gt; 前边选项打勾 1.当前文件搜索1command + F  搜索HomeContent示例:   2. 当前文件替换12command + shift + R">
<meta property="og:type" content="article">
<meta property="og:title" content="Flutter快捷键Mac">
<meta property="og:url" content="https://yllove.gitee.io/2021/12/29/Flutter/Flutter%E5%BF%AB%E6%8D%B7%E9%94%AEMac/index.html">
<meta property="og:site_name" content="Albert Yuan&#39;s Blog">
<meta property="og:description" content="Keymap中文文件乱码Android Studio -&gt; Preferences -&gt; Appearance &amp; Behavior -&gt; Appearance -&gt; Use custom font -&gt; 前边选项打勾 1.当前文件搜索1command + F  搜索HomeContent示例:   2. 当前文件替换12command + shift + R">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://yllove.gitee.io/img/defaultCover.png">
<meta property="article:published_time" content="2021-12-29T06:36:44.738Z">
<meta property="article:modified_time" content="2022-01-11T05:24:39.967Z">
<meta property="article:author" content="Albert Yuan">
<meta property="article:tag" content="Flutter">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://yllove.gitee.io/img/defaultCover.png"><link rel="shortcut icon" href="/blog/img/favicon.png"><link rel="canonical" href="https://yllove.gitee.io/2021/12/29/Flutter/Flutter%E5%BF%AB%E6%8D%B7%E9%94%AEMac/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><meta/><link rel="stylesheet" href="/blog/css/index.css"><link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/instantsearch.js@2.10.5/dist/instantsearch.min.css" media="print" onload="this.media='all'"><script src="https://fastly.jsdelivr.net/npm/instantsearch.js@2.10.5/dist/instantsearch.min.js" defer></script><script>const GLOBAL_CONFIG = { 
  root: '/blog/',
  algolia: {"appId":"X8NS0XSX99","apiKey":"b9d4530647c8b5bf7928a04c47752ad7","indexName":"albertyuan","hits":{"per_page":6},"languages":{"input_placeholder":"搜索文章","hits_empty":"找不到您查询的内容：${query}","hits_stats":"找到 ${hits} 条结果，用时 ${time} 毫秒"}},
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    jQuery: 'https://fastly.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
    justifiedGallery: {
      js: 'https://fastly.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
      css: 'https://fastly.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
    },
    fancybox: {
      js: 'https://fastly.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
      css: 'https://fastly.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
    }
  },
  isPhotoFigcaption: true,
  islazyload: true,
  isanchor: true
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'Flutter快捷键Mac',
  isPost: true,
  isHome: false,
  isHighlightShrink: true,
  isToc: true,
  postUpdate: '2022-01-11 13:24:39'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const fontSizeVal = saveToLocal.get('global-font-size')
    if (fontSizeVal !== undefined) {
      document.documentElement.style.setProperty('--global-font-size', fontSizeVal + 'px')
    }
    
    const detectApple = () => {
      if (GLOBAL_CONFIG_SITE.isHome && /iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 6.2.0"><link rel="alternate" href="/blog/atom.xml" title="Albert Yuan's Blog" type="application/atom+xml">
</head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src= "" data-lazy-src="/blog/img/favicon.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/blog/archives/"><div class="headline">文章</div><div class="length-num">155</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/blog/tags/"><div class="headline">标签</div><div class="length-num">56</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/blog/categories/"><div class="headline">分类</div><div class="length-num">32</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/blog/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/blog/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/blog/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/blog/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/blog/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('/blog/img/defaultCover.png')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/blog/">Albert Yuan's Blog</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/blog/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/blog/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/blog/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/blog/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/blog/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">Flutter快捷键Mac</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2021-12-29T06:36:44.738Z" title="发表于 2021-12-29 14:36:44">2021-12-29</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2022-01-11T05:24:39.967Z" title="更新于 2022-01-11 13:24:39">2022-01-11</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/blog/categories/Flutter/">Flutter</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">866</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>3分钟</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="Flutter快捷键Mac"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h3 id="Keymap"><a href="#Keymap" class="headerlink" title="Keymap"></a>Keymap</h3><p>中文文件乱码Android Studio -&gt; Preferences -&gt; Appearance &amp; Behavior -&gt; Appearance -&gt; Use custom font -&gt; 前边选项打勾</p>
<h3 id="1-当前文件搜索"><a href="#1-当前文件搜索" class="headerlink" title="1.当前文件搜索"></a>1.当前文件搜索</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">command <span class="operator">+</span> <span class="type">F</span></span><br></pre></td></tr></table></figure>

<p>搜索HomeContent示例:</p>
<p><img src= "" data-lazy-src="https://upload-images.jianshu.io/upload_images/987457-dc6c7ccc61eafc5f.jpeg?imageMogr2/auto-orient/strip%7CimageView2/2/w/981/format/webp" alt="img"></p>
<hr>
<h3 id="2-当前文件替换"><a href="#2-当前文件替换" class="headerlink" title="2. 当前文件替换"></a>2. 当前文件替换</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">command <span class="operator">+</span> shift <span class="operator">+</span> <span class="type">R</span></span><br><span class="line"></span><br></pre></td></tr></table></figure>

<hr>
<h3 id="3-全局查找"><a href="#3-全局查找" class="headerlink" title="3. 全局查找"></a>3. 全局查找</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">command <span class="operator">+</span> shift <span class="operator">+</span> <span class="type">F</span></span><br></pre></td></tr></table></figure>

<p><img src= "" data-lazy-src="https://upload-images.jianshu.io/upload_images/987457-3db66145f6ccc298.jpeg?imageMogr2/auto-orient/strip%7CimageView2/2/w/792/format/webp" alt="img"></p>
<hr>
<h3 id="4-全局替换"><a href="#4-全局替换" class="headerlink" title="4. 全局替换"></a>4. 全局替换</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">command <span class="operator">+</span> shift <span class="operator">+</span> <span class="type">R</span></span><br></pre></td></tr></table></figure>

<h3 id="5-全局搜索类-x2F-文件-x2F-关键字-x2F-包括系统类-自定义类"><a href="#5-全局搜索类-x2F-文件-x2F-关键字-x2F-包括系统类-自定义类" class="headerlink" title="5.全局搜索类&#x2F;文件&#x2F;关键字&#x2F;(包括系统类,自定义类)"></a>5.全局搜索类&#x2F;文件&#x2F;关键字&#x2F;(包括系统类,自定义类)</h3><p>应用场景:搜索整个项目的一些文件资源,查看系统类的方法,全局搜索方法</p>
<figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">command <span class="operator">+</span> <span class="type">O</span></span><br></pre></td></tr></table></figure>

<p>如图,全局搜索图片timg</p>
<p><img src= "" data-lazy-src="https://upload-images.jianshu.io/upload_images/987457-01e793018a2b7370.jpeg?imageMogr2/auto-orient/strip%7CimageView2/2/w/904/format/webp" alt="img"></p>
<p>2451DA1F-4FC9-4A24-873A-F98DAEC8EFA1.png.jpeg</p>
<h3 id="6-全局搜索方法"><a href="#6-全局搜索方法" class="headerlink" title="6.全局搜索方法"></a>6.全局搜索方法</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">command <span class="operator">+</span> option <span class="operator">+</span> <span class="type">O</span></span><br></pre></td></tr></table></figure>

<p><img src= "" data-lazy-src="https://upload-images.jianshu.io/upload_images/987457-02c39cd391269f9d.jpeg?imageMogr2/auto-orient/strip%7CimageView2/2/w/692/format/webp" alt="img"></p>
<hr>
<h3 id="7-将StatelessWidget转-StatefulWidget"><a href="#7-将StatelessWidget转-StatefulWidget" class="headerlink" title="7.将StatelessWidget转 StatefulWidget"></a>7.将StatelessWidget转 StatefulWidget</h3><p>鼠标选中需要转换的类名,或光标放到类名之间</p>
<figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">option <span class="operator">+</span> enter</span><br></pre></td></tr></table></figure>

<p><img src= "" data-lazy-src="https://upload-images.jianshu.io/upload_images/987457-b1ee2754c8010eb7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/338/format/webp" alt="img"></p>
<hr>
<h3 id="8-抽取代码为单独的Widget"><a href="#8-抽取代码为单独的Widget" class="headerlink" title="8.抽取代码为单独的Widget"></a>8.抽取代码为单独的Widget</h3><p>有时候代码嵌套太多,不方便阅读,抽取Widget为一个单独的类,提高代码的阅读性</p>
<figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 鼠标选中需要转换的类名,或光标放到类名之间</span></span><br><span class="line">command  <span class="operator">+</span> option <span class="operator">+</span> <span class="type">W</span></span><br></pre></td></tr></table></figure>

<p><strong>注:这个组合快捷键如果不能使用,说明有冲突的,可以在设置中删除另外一个</strong></p>
<p><img src= "" data-lazy-src="https://upload-images.jianshu.io/upload_images/987457-9e5ea3e0de2a02c4.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/314/format/webp" alt="img"></p>
<p>Pasted Graphic.png</p>
<h3 id="9-抽取代码为单独的方法-或者抽取成get方法"><a href="#9-抽取代码为单独的方法-或者抽取成get方法" class="headerlink" title="9.抽取代码为单独的方法,或者抽取成get方法"></a>9.抽取代码为单独的方法,或者抽取成get方法</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">command  <span class="operator">+</span> option <span class="operator">+</span> <span class="type">M</span></span><br></pre></td></tr></table></figure>

<p><strong>注意: 光标放到类名之间,不能选中类名</strong></p>
<p><img src= "" data-lazy-src="https://upload-images.jianshu.io/upload_images/987457-c1ed570445d38da2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/316/format/webp" alt="img"></p>
<hr>
<h3 id="10-查看抽象类的实现"><a href="#10-查看抽象类的实现" class="headerlink" title="10.查看抽象类的实现"></a>10.查看抽象类的实现</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">command  <span class="operator">+</span> option <span class="operator">+</span> <span class="type">B</span></span><br></pre></td></tr></table></figure>

<p><img src= "" data-lazy-src="https://upload-images.jianshu.io/upload_images/987457-d93f122c7a55f1d5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/739/format/webp" alt="img"></p>
<p>Pasted Graphic 2.png</p>
<p>也可以点击右侧面板 Flutter Outline 查看当前文件的目录结构,快速的查找出当前抽象类的子类</p>
<p><img src= "" data-lazy-src="https://upload-images.jianshu.io/upload_images/987457-70f648e5a272df14.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/894/format/webp" alt="img"></p>
<p>Pasted Graphic 3.png</p>
<h3 id="11-快速创建一个StatelessWidget"><a href="#11-快速创建一个StatelessWidget" class="headerlink" title="11.快速创建一个StatelessWidget"></a>11.快速创建一个StatelessWidget</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">stless</span><br></pre></td></tr></table></figure>

<h3 id="12-快速创建一个StatefulWidget⭐️⭐️⭐️⭐️⭐️⭐️"><a href="#12-快速创建一个StatefulWidget⭐️⭐️⭐️⭐️⭐️⭐️" class="headerlink" title="12.快速创建一个StatefulWidget⭐️⭐️⭐️⭐️⭐️⭐️"></a>12.快速创建一个StatefulWidget⭐️⭐️⭐️⭐️⭐️⭐️</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">stful</span><br></pre></td></tr></table></figure>

<h3 id="13-格式化代码"><a href="#13-格式化代码" class="headerlink" title="13.格式化代码"></a>13.格式化代码</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">command <span class="operator">+</span> option <span class="operator">+</span> <span class="type">L</span> </span><br></pre></td></tr></table></figure>

<p>如下代码,参数之间有多余的空格,或者缺少空格,可使用快捷键自动对齐,省去自己手动添加或者删除空格</p>
<figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">child: <span class="type">Icon</span>(<span class="type">Icons</span>.pets, size:<span class="number">32</span>, color:     <span class="type">Colors</span>.white),</span><br></pre></td></tr></table></figure>

<h3 id="14-自动缩进对齐-x2F-代码对齐⭐️⭐️⭐️⭐️⭐️⭐️"><a href="#14-自动缩进对齐-x2F-代码对齐⭐️⭐️⭐️⭐️⭐️⭐️" class="headerlink" title="14.自动缩进对齐&#x2F;代码对齐⭐️⭐️⭐️⭐️⭐️⭐️"></a>14.自动缩进对齐&#x2F;代码对齐⭐️⭐️⭐️⭐️⭐️⭐️</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">control <span class="operator">+</span> option <span class="operator">+</span> <span class="type">I</span></span><br></pre></td></tr></table></figure>

<h3 id="15-局部代码块展开-x2F-收缩"><a href="#15-局部代码块展开-x2F-收缩" class="headerlink" title="15.局部代码块展开&#x2F;收缩"></a>15.局部代码块展开&#x2F;收缩</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 展开</span></span><br><span class="line">command <span class="operator">+</span> 加号</span><br><span class="line"><span class="comment">// 收缩</span></span><br><span class="line">command <span class="operator">-</span> 减号</span><br></pre></td></tr></table></figure>

<h3 id="16-页面内-类代码块展开-x2F-收缩"><a href="#16-页面内-类代码块展开-x2F-收缩" class="headerlink" title="16.页面内,类代码块展开&#x2F;收缩"></a>16.页面内,类代码块展开&#x2F;收缩</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 展开</span></span><br><span class="line">command <span class="operator">+</span> shift <span class="operator">+</span> 加号</span><br><span class="line"><span class="comment">// 收缩</span></span><br><span class="line">command <span class="operator">+</span> shift <span class="operator">+</span> 减号</span><br></pre></td></tr></table></figure>

<p><img src= "" data-lazy-src="https://upload-images.jianshu.io/upload_images/987457-f79c10a37ac11cde.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/354/format/webp" alt="img"></p>
<p>Pasted Graphic 4.png</p>
<h3 id="17-隐藏左侧目录结构窗口"><a href="#17-隐藏左侧目录结构窗口" class="headerlink" title="17.隐藏左侧目录结构窗口"></a>17.隐藏左侧目录结构窗口</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">shift  <span class="operator">+</span> esc </span><br></pre></td></tr></table></figure>

<p>点击左上角Project展开窗口</p>
<h3 id="18-复制单行"><a href="#18-复制单行" class="headerlink" title="18.复制单行"></a>18.复制单行</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">command <span class="operator">+</span> <span class="type">D</span></span><br></pre></td></tr></table></figure>

<p><strong>不需要选中代码,只需要光标位置在需要复制的行即可</strong></p>
<h3 id="19-上下移动代码"><a href="#19-上下移动代码" class="headerlink" title="19.上下移动代码"></a>19.上下移动代码</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">option <span class="operator">+</span> shift <span class="operator">+</span> up<span class="operator">/</span>down</span><br></pre></td></tr></table></figure>

<h3 id="20-选择区域"><a href="#20-选择区域" class="headerlink" title="20.选择区域"></a>20.选择区域</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">option <span class="operator">+</span> 双击 up</span><br></pre></td></tr></table></figure>

<p><strong>注:多次点击up箭头可以扩大选中区域</strong></p>
<h3 id="21-热重载-hot-reload"><a href="#21-热重载-hot-reload" class="headerlink" title="21.热重载(hot reload)"></a>21.热重载(hot reload)</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">command <span class="operator">+</span> \  </span><br></pre></td></tr></table></figure>

<h3 id="22-热重启-hot-restart"><a href="#22-热重启-hot-restart" class="headerlink" title="22.热重启(hot restart)"></a>22.热重启(hot restart)</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">command<span class="operator">+</span> option <span class="operator">+</span> \  </span><br></pre></td></tr></table></figure>

<h3 id="23-运行项目"><a href="#23-运行项目" class="headerlink" title="23.运行项目"></a>23.运行项目</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">control<span class="operator">+</span> <span class="type">R</span></span><br></pre></td></tr></table></figure>

<h3 id="24-删除行"><a href="#24-删除行" class="headerlink" title="24.删除行"></a>24.删除行</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">command<span class="operator">+</span> delete</span><br></pre></td></tr></table></figure>

<h3 id="25-注释与取消注释-效果"><a href="#25-注释与取消注释-效果" class="headerlink" title="25.注释与取消注释,效果/**/"></a>25.注释与取消注释,效果<code>/**/</code></h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">command<span class="operator">+</span> option <span class="operator">+</span> <span class="operator">/</span></span><br></pre></td></tr></table></figure>

<h3 id="26-if后面自动加"><a href="#26-if后面自动加" class="headerlink" title="26.if后面自动加(){ }"></a>26.if后面自动加<code>()&#123; &#125;</code></h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">command<span class="operator">+</span> shift <span class="operator">+</span> enter</span><br></pre></td></tr></table></figure>

<h3 id="27-快速生成模版代码块"><a href="#27-快速生成模版代码块" class="headerlink" title="27.快速生成模版代码块"></a>27.快速生成模版代码块</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">command<span class="operator">+</span> <span class="type">J</span></span><br></pre></td></tr></table></figure>

<p>示例</p>
<figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">for</span> (<span class="keyword">var</span> i <span class="operator">=</span> <span class="number">0</span>; i <span class="operator">&lt;</span> password.length; <span class="operator">++</span>i) &#123;</span><br><span class="line">    <span class="keyword">var</span> o <span class="operator">=</span> password[i];</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h3 id="28-Surround-with快速调出if-for-try…catch-while等环绕代码"><a href="#28-Surround-with快速调出if-for-try…catch-while等环绕代码" class="headerlink" title="28.Surround with快速调出if,for,try…catch,while等环绕代码"></a>28.Surround with快速调出if,for,try…catch,while等环绕代码</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">command<span class="operator">+</span> option <span class="operator">+</span> <span class="type">T</span></span><br></pre></td></tr></table></figure>

<p>选中需要嵌套的代码,使用这个组合快捷键可以包裹需要的代码块,如图</p>
<p><img src= "" data-lazy-src="https://upload-images.jianshu.io/upload_images/987457-500ff77976e00cc9.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/322/format/webp" alt="img"></p>
<p>Pasted Graphic 5.png</p>
<h3 id="29-添加或者移除widget⭐️⭐️⭐️⭐️⭐️⭐️"><a href="#29-添加或者移除widget⭐️⭐️⭐️⭐️⭐️⭐️" class="headerlink" title="29.添加或者移除widget⭐️⭐️⭐️⭐️⭐️⭐️"></a>29.添加或者移除widget⭐️⭐️⭐️⭐️⭐️⭐️</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">option <span class="operator">+</span> enter</span><br></pre></td></tr></table></figure>

<p><img src= "" data-lazy-src="https://upload-images.jianshu.io/upload_images/987457-a7b2feec26e900d7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/594/format/webp" alt="img"></p>
<p>Pasted Graphic 6.png</p>
<h3 id="30-选中代码缩进"><a href="#30-选中代码缩进" class="headerlink" title="30.选中代码缩进"></a>30.选中代码缩进</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">选中代码 <span class="operator">+</span> tab</span><br><span class="line">选中代码 <span class="operator">+</span> shift <span class="operator">+</span> tab</span><br></pre></td></tr></table></figure>

<h3 id="31-给Model所有下划线属性生成get和set方法-光标插入到类名"><a href="#31-给Model所有下划线属性生成get和set方法-光标插入到类名" class="headerlink" title="31.给Model所有下划线属性生成get和set方法,光标插入到类名"></a>31.给Model所有下划线属性生成get和set方法,光标插入到类名</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">control <span class="operator">+</span> enter</span><br></pre></td></tr></table></figure>

<p><img src= "" data-lazy-src="https://upload-images.jianshu.io/upload_images/987457-050d1465c4453fea.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/531/format/webp" alt="img"></p>
<p>Select Fields to Generate Getters and Setters.png</p>
<p>示例代码</p>
<figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">class</span> <span class="title class_">TestModel</span> &#123;</span><br><span class="line"></span><br><span class="line">  <span class="type">String</span> _message;</span><br><span class="line"></span><br><span class="line">  <span class="type">String</span> <span class="keyword">get</span> message <span class="operator">=&gt;</span> _message;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">set</span> message(<span class="type">String</span> value) &#123;</span><br><span class="line">    _message <span class="operator">=</span> value;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="type">String</span> _name;</span><br><span class="line">  int _timestamp;</span><br><span class="line"></span><br><span class="line">  <span class="type">String</span> <span class="keyword">get</span> name <span class="operator">=&gt;</span> _name;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">set</span> name(<span class="type">String</span> value) &#123;</span><br><span class="line">    _name <span class="operator">=</span> value;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  int <span class="keyword">get</span> timestamp <span class="operator">=&gt;</span> _timestamp;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">set</span> timestamp(int value) &#123;</span><br><span class="line">    _timestamp <span class="operator">=</span> value;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h3 id="32-快速导入头文件"><a href="#32-快速导入头文件" class="headerlink" title="32.快速导入头文件"></a>32.快速导入头文件</h3><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">option <span class="operator">+</span> enter</span><br></pre></td></tr></table></figure>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined">Albert Yuan</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://yllove.gitee.io/2021/12/29/Flutter/Flutter%E5%BF%AB%E6%8D%B7%E9%94%AEMac/">https://yllove.gitee.io/2021/12/29/Flutter/Flutter%E5%BF%AB%E6%8D%B7%E9%94%AEMac/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://yllove.gitee.io" target="_blank">Albert Yuan's Blog</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/blog/tags/Flutter/">Flutter</a></div><div class="post_share"><div class="social-share" data-image="/blog/img/defaultCover.png" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://fastly.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/blog/2021/12/27/Flutter/flutter%E5%9F%BA%E7%A1%80%E7%BB%84%E4%BB%B6%E4%BD%BF%E7%94%A8/"><img class="prev-cover" src= "" data-lazy-src="/blog/img/defaultCover.png" onerror="onerror=null;src='/blog/img/defaultCover.gif'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">flutter基础组件使用</div></div></a></div><div class="next-post pull-right"><a href="/blog/2021/12/30/Flutter/flutter4-dart%E5%BC%82%E6%AD%A5%E7%BC%96%E7%A8%8B/"><img class="next-cover" src= "" data-lazy-src="/blog/img/defaultCover.png" onerror="onerror=null;src='/blog/img/defaultCover.gif'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">flutter4-dart异步编程</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span> 相关推荐</span></div><div class="relatedPosts-list"><div><a href="/blog/2021/09/23/Flutter/Flutter基础2Flutter简介/" title="Flutter基础2Flutter简介"><img class="cover" src= "" data-lazy-src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic3.zhimg.com%2Fv2-0831ab242b01a6de64757dfd7b0197d1_1200x500.jpg&refer=http%3A%2F%2Fpic3.zhimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1634956133&t=ecc2a799267cb1cd0dda77522b8d3062" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2021-09-23</div><div class="title">Flutter基础2Flutter简介</div></div></a></div><div><a href="/blog/2021/10/25/Flutter/flutter3-Dart语言入门/" title="flutter3-Dart语言入门"><img class="cover" src= "" data-lazy-src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic3.zhimg.com%2Fv2-0831ab242b01a6de64757dfd7b0197d1_1200x500.jpg&refer=http%3A%2F%2Fpic3.zhimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1634956133&t=ecc2a799267cb1cd0dda77522b8d3062" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2021-10-25</div><div class="title">flutter3-Dart语言入门</div></div></a></div><div><a href="/blog/2021/12/27/Flutter/flutter基础组件使用/" title="flutter基础组件使用"><img class="cover" src= "" data-lazy-src="/blog/img/defaultCover.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2021-12-27</div><div class="title">flutter基础组件使用</div></div></a></div><div><a href="/blog/2021/12/27/Flutter/flutter目录分析/" title="flutter目录分析"><img class="cover" src= "" data-lazy-src="/blog/img/defaultCover.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2021-12-27</div><div class="title">flutter目录分析</div></div></a></div><div><a href="/blog/2022/01/13/Flutter/flutter项目架构/" title="flutter项目架构"><img class="cover" src= "" data-lazy-src="/blog/img/defaultCover.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2022-01-13</div><div class="title">flutter项目架构</div></div></a></div><div><a href="/blog/2021/09/23/Flutter/Flutter基础1-跨平台应用分类/" title="Flutter基础1:跨平台应用分类"><img class="cover" src= "" data-lazy-src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic3.zhimg.com%2Fv2-0831ab242b01a6de64757dfd7b0197d1_1200x500.jpg&refer=http%3A%2F%2Fpic3.zhimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1634956133&t=ecc2a799267cb1cd0dda77522b8d3062" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2021-09-23</div><div class="title">Flutter基础1:跨平台应用分类</div></div></a></div></div></div><hr/><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div></div><div class="comment-wrap"><div><div class="vcomment" id="vcomment"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src= "" data-lazy-src="/blog/img/favicon.png" onerror="this.onerror=null;this.src='/blog/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">Albert Yuan</div><div class="author-info__description">博学之,审问之,慎思之,明辨之,笃行之</div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/blog/archives/"><div class="headline">文章</div><div class="length-num">155</div></a></div><div class="card-info-data-item is-center"><a href="/blog/tags/"><div class="headline">标签</div><div class="length-num">56</div></a></div><div class="card-info-data-item is-center"><a href="/blog/categories/"><div class="headline">分类</div><div class="length-num">32</div></a></div></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/yuanliangYL"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/yuanliangYL" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="mailto:yuanliangios@163.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a><a class="social-icon" href="qq:1023817403" target="_blank" title="QQ"><i class="fab fa-qq"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content">love cat , love life</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#Keymap"><span class="toc-text">Keymap</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#1-%E5%BD%93%E5%89%8D%E6%96%87%E4%BB%B6%E6%90%9C%E7%B4%A2"><span class="toc-text">1.当前文件搜索</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-%E5%BD%93%E5%89%8D%E6%96%87%E4%BB%B6%E6%9B%BF%E6%8D%A2"><span class="toc-text">2. 当前文件替换</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-%E5%85%A8%E5%B1%80%E6%9F%A5%E6%89%BE"><span class="toc-text">3. 全局查找</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-%E5%85%A8%E5%B1%80%E6%9B%BF%E6%8D%A2"><span class="toc-text">4. 全局替换</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-%E5%85%A8%E5%B1%80%E6%90%9C%E7%B4%A2%E7%B1%BB-x2F-%E6%96%87%E4%BB%B6-x2F-%E5%85%B3%E9%94%AE%E5%AD%97-x2F-%E5%8C%85%E6%8B%AC%E7%B3%BB%E7%BB%9F%E7%B1%BB-%E8%87%AA%E5%AE%9A%E4%B9%89%E7%B1%BB"><span class="toc-text">5.全局搜索类&#x2F;文件&#x2F;关键字&#x2F;(包括系统类,自定义类)</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#6-%E5%85%A8%E5%B1%80%E6%90%9C%E7%B4%A2%E6%96%B9%E6%B3%95"><span class="toc-text">6.全局搜索方法</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#7-%E5%B0%86StatelessWidget%E8%BD%AC-StatefulWidget"><span class="toc-text">7.将StatelessWidget转 StatefulWidget</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#8-%E6%8A%BD%E5%8F%96%E4%BB%A3%E7%A0%81%E4%B8%BA%E5%8D%95%E7%8B%AC%E7%9A%84Widget"><span class="toc-text">8.抽取代码为单独的Widget</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#9-%E6%8A%BD%E5%8F%96%E4%BB%A3%E7%A0%81%E4%B8%BA%E5%8D%95%E7%8B%AC%E7%9A%84%E6%96%B9%E6%B3%95-%E6%88%96%E8%80%85%E6%8A%BD%E5%8F%96%E6%88%90get%E6%96%B9%E6%B3%95"><span class="toc-text">9.抽取代码为单独的方法,或者抽取成get方法</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#10-%E6%9F%A5%E7%9C%8B%E6%8A%BD%E8%B1%A1%E7%B1%BB%E7%9A%84%E5%AE%9E%E7%8E%B0"><span class="toc-text">10.查看抽象类的实现</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#11-%E5%BF%AB%E9%80%9F%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AAStatelessWidget"><span class="toc-text">11.快速创建一个StatelessWidget</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#12-%E5%BF%AB%E9%80%9F%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AAStatefulWidget%E2%AD%90%EF%B8%8F%E2%AD%90%EF%B8%8F%E2%AD%90%EF%B8%8F%E2%AD%90%EF%B8%8F%E2%AD%90%EF%B8%8F%E2%AD%90%EF%B8%8F"><span class="toc-text">12.快速创建一个StatefulWidget⭐️⭐️⭐️⭐️⭐️⭐️</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#13-%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81"><span class="toc-text">13.格式化代码</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#14-%E8%87%AA%E5%8A%A8%E7%BC%A9%E8%BF%9B%E5%AF%B9%E9%BD%90-x2F-%E4%BB%A3%E7%A0%81%E5%AF%B9%E9%BD%90%E2%AD%90%EF%B8%8F%E2%AD%90%EF%B8%8F%E2%AD%90%EF%B8%8F%E2%AD%90%EF%B8%8F%E2%AD%90%EF%B8%8F%E2%AD%90%EF%B8%8F"><span class="toc-text">14.自动缩进对齐&#x2F;代码对齐⭐️⭐️⭐️⭐️⭐️⭐️</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#15-%E5%B1%80%E9%83%A8%E4%BB%A3%E7%A0%81%E5%9D%97%E5%B1%95%E5%BC%80-x2F-%E6%94%B6%E7%BC%A9"><span class="toc-text">15.局部代码块展开&#x2F;收缩</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#16-%E9%A1%B5%E9%9D%A2%E5%86%85-%E7%B1%BB%E4%BB%A3%E7%A0%81%E5%9D%97%E5%B1%95%E5%BC%80-x2F-%E6%94%B6%E7%BC%A9"><span class="toc-text">16.页面内,类代码块展开&#x2F;收缩</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#17-%E9%9A%90%E8%97%8F%E5%B7%A6%E4%BE%A7%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84%E7%AA%97%E5%8F%A3"><span class="toc-text">17.隐藏左侧目录结构窗口</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#18-%E5%A4%8D%E5%88%B6%E5%8D%95%E8%A1%8C"><span class="toc-text">18.复制单行</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#19-%E4%B8%8A%E4%B8%8B%E7%A7%BB%E5%8A%A8%E4%BB%A3%E7%A0%81"><span class="toc-text">19.上下移动代码</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#20-%E9%80%89%E6%8B%A9%E5%8C%BA%E5%9F%9F"><span class="toc-text">20.选择区域</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#21-%E7%83%AD%E9%87%8D%E8%BD%BD-hot-reload"><span class="toc-text">21.热重载(hot reload)</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#22-%E7%83%AD%E9%87%8D%E5%90%AF-hot-restart"><span class="toc-text">22.热重启(hot restart)</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#23-%E8%BF%90%E8%A1%8C%E9%A1%B9%E7%9B%AE"><span class="toc-text">23.运行项目</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#24-%E5%88%A0%E9%99%A4%E8%A1%8C"><span class="toc-text">24.删除行</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#25-%E6%B3%A8%E9%87%8A%E4%B8%8E%E5%8F%96%E6%B6%88%E6%B3%A8%E9%87%8A-%E6%95%88%E6%9E%9C"><span class="toc-text">25.注释与取消注释,效果&#x2F;**&#x2F;</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#26-if%E5%90%8E%E9%9D%A2%E8%87%AA%E5%8A%A8%E5%8A%A0"><span class="toc-text">26.if后面自动加(){ }</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#27-%E5%BF%AB%E9%80%9F%E7%94%9F%E6%88%90%E6%A8%A1%E7%89%88%E4%BB%A3%E7%A0%81%E5%9D%97"><span class="toc-text">27.快速生成模版代码块</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#28-Surround-with%E5%BF%AB%E9%80%9F%E8%B0%83%E5%87%BAif-for-try%E2%80%A6catch-while%E7%AD%89%E7%8E%AF%E7%BB%95%E4%BB%A3%E7%A0%81"><span class="toc-text">28.Surround with快速调出if,for,try…catch,while等环绕代码</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#29-%E6%B7%BB%E5%8A%A0%E6%88%96%E8%80%85%E7%A7%BB%E9%99%A4widget%E2%AD%90%EF%B8%8F%E2%AD%90%EF%B8%8F%E2%AD%90%EF%B8%8F%E2%AD%90%EF%B8%8F%E2%AD%90%EF%B8%8F%E2%AD%90%EF%B8%8F"><span class="toc-text">29.添加或者移除widget⭐️⭐️⭐️⭐️⭐️⭐️</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#30-%E9%80%89%E4%B8%AD%E4%BB%A3%E7%A0%81%E7%BC%A9%E8%BF%9B"><span class="toc-text">30.选中代码缩进</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#31-%E7%BB%99Model%E6%89%80%E6%9C%89%E4%B8%8B%E5%88%92%E7%BA%BF%E5%B1%9E%E6%80%A7%E7%94%9F%E6%88%90get%E5%92%8Cset%E6%96%B9%E6%B3%95-%E5%85%89%E6%A0%87%E6%8F%92%E5%85%A5%E5%88%B0%E7%B1%BB%E5%90%8D"><span class="toc-text">31.给Model所有下划线属性生成get和set方法,光标插入到类名</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#32-%E5%BF%AB%E9%80%9F%E5%AF%BC%E5%85%A5%E5%A4%B4%E6%96%87%E4%BB%B6"><span class="toc-text">32.快速导入头文件</span></a></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/blog/2023/02/07/iOS%E5%BC%80%E5%8F%91%E8%BF%9B%E9%98%B6/iOS-%E8%87%AA%E5%AE%9A%E4%B9%89%E7%BD%91%E9%A1%B5%E4%B8%8B%E8%BD%BDIPA%E5%8C%85/" title="iOS 自定义网页下载IPA包"><img src= "" data-lazy-src="https://img.mp.itc.cn/upload/20170409/1a8f793d7282451cbd1beb6841608c90_th.jpeg" onerror="this.onerror=null;this.src='/blog/img/defaultCover.gif'" alt="iOS 自定义网页下载IPA包"/></a><div class="content"><a class="title" href="/blog/2023/02/07/iOS%E5%BC%80%E5%8F%91%E8%BF%9B%E9%98%B6/iOS-%E8%87%AA%E5%AE%9A%E4%B9%89%E7%BD%91%E9%A1%B5%E4%B8%8B%E8%BD%BDIPA%E5%8C%85/" title="iOS 自定义网页下载IPA包">iOS 自定义网页下载IPA包</a><time datetime="2023-02-07T02:46:29.851Z" title="更新于 2023-02-07 10:46:29">2023-02-07</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/blog/2023/02/06/Flutter/Flutter%E6%8E%A5%E5%85%A5%E5%8E%9F%E7%94%9F-iOS/" title="flutter接入原生-iOS"><img src= "" data-lazy-src="https://pic4.zhimg.com/v2-6a115fea4db1ad770dccf4119bfab36f_1440w.jpg?source=172ae18b" onerror="this.onerror=null;this.src='/blog/img/defaultCover.gif'" alt="flutter接入原生-iOS"/></a><div class="content"><a class="title" href="/blog/2023/02/06/Flutter/Flutter%E6%8E%A5%E5%85%A5%E5%8E%9F%E7%94%9F-iOS/" title="flutter接入原生-iOS">flutter接入原生-iOS</a><time datetime="2023-02-07T01:18:53.661Z" title="更新于 2023-02-07 09:18:53">2023-02-07</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/blog/2022/12/17/iOS%E5%BC%80%E5%8F%91%E8%BF%9B%E9%98%B6/iOS%20%E5%A6%82%E4%BD%95%E5%9C%A8%E6%A8%A1%E6%8B%9F%E5%99%A8%E4%B8%AD%E5%AE%89%E8%A3%85APP/" title="iOS 如何在模拟器中安装APP"><img src= "" data-lazy-src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fwww.winwin7.com%2Fuploadfile%2F2021%2F0114%2F20210114141748239.jpg&amp;refer=http%3A%2F%2Fwww.winwin7.com&amp;app=2002&amp;size=f9999,10000&amp;q=a80&amp;n=0&amp;g=0n&amp;fmt=auto?sec=1673854539&amp;t=aad2108ffb799b04e94a28cc58f038f1" onerror="this.onerror=null;this.src='/blog/img/defaultCover.gif'" alt="iOS 如何在模拟器中安装APP"/></a><div class="content"><a class="title" href="/blog/2022/12/17/iOS%E5%BC%80%E5%8F%91%E8%BF%9B%E9%98%B6/iOS%20%E5%A6%82%E4%BD%95%E5%9C%A8%E6%A8%A1%E6%8B%9F%E5%99%A8%E4%B8%AD%E5%AE%89%E8%A3%85APP/" title="iOS 如何在模拟器中安装APP">iOS 如何在模拟器中安装APP</a><time datetime="2022-12-17T07:48:56.594Z" title="更新于 2022-12-17 15:48:56">2022-12-17</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/blog/2021/08/05/Swift/swift%E5%B8%B8%E7%94%A8%E4%B8%89%E6%96%B9%E5%BA%93/" title="swift常用三方库"><img src= "" data-lazy-src="https://photos.infinum.com/store/b558bd40787ecad225d9c66322f14522" onerror="this.onerror=null;this.src='/blog/img/defaultCover.gif'" alt="swift常用三方库"/></a><div class="content"><a class="title" href="/blog/2021/08/05/Swift/swift%E5%B8%B8%E7%94%A8%E4%B8%89%E6%96%B9%E5%BA%93/" title="swift常用三方库">swift常用三方库</a><time datetime="2022-12-16T06:37:20.115Z" title="更新于 2022-12-16 14:37:20">2022-12-16</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/blog/2022/12/12/iOS%E5%BC%80%E5%8F%91%E8%BF%9B%E9%98%B6/GCD%E8%BF%9B%E9%98%B6%E4%B9%8BDispatchWorkItem%E5%92%8CDispatchGroup/" title="GCD进阶之DispatchWorkItem和DispatchGroup"><img src= "" data-lazy-src="/blog/img/defaultCover.png" onerror="this.onerror=null;this.src='/blog/img/defaultCover.gif'" alt="GCD进阶之DispatchWorkItem和DispatchGroup"/></a><div class="content"><a class="title" href="/blog/2022/12/12/iOS%E5%BC%80%E5%8F%91%E8%BF%9B%E9%98%B6/GCD%E8%BF%9B%E9%98%B6%E4%B9%8BDispatchWorkItem%E5%92%8CDispatchGroup/" title="GCD进阶之DispatchWorkItem和DispatchGroup">GCD进阶之DispatchWorkItem和DispatchGroup</a><time datetime="2022-12-12T07:19:37.277Z" title="更新于 2022-12-12 15:19:37">2022-12-12</time></div></div></div></div></div></div></main><footer id="footer" style="background-image: url('/blog/img/defaultCover.png')"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2023 By Albert Yuan</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text">Hi, welcom to my  blog</div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="font-plus" type="button" title="放大字体"><i class="fas fa-plus"></i></button><button id="font-minus" type="button" title="缩小字体"><i class="fas fa-minus"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><a id="to_comment" href="#post-comment" title="直达评论"><i class="fas fa-comments"></i></a><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="algolia-search"><div class="search-dialog"><div class="search-dialog__title" id="algolia-search-title">Algolia</div><div id="algolia-input-panel"><div id="algolia-search-input"></div></div><hr/><div id="algolia-search-results"><div id="algolia-hits"></div><div id="algolia-pagination"></div><div id="algolia-stats"></div></div><span class="search-close-button"><i class="fas fa-times"></i></span></div><div id="search-mask"></div></div><div><script src="/blog/js/utils.js"></script><script src="/blog/js/main.js"></script><script src="https://fastly.jsdelivr.net/npm/vanilla-lazyload/dist/lazyload.iife.min.js"></script><script src="/blog/js/search/algolia.js"></script><script>var preloader = {
  endLoading: () => {
    document.body.style.overflow = 'auto';
    document.getElementById('loading-box').classList.add("loaded")
  },
  initLoading: () => {
    document.body.style.overflow = '';
    document.getElementById('loading-box').classList.remove("loaded")

  }
}
window.addEventListener('load',preloader.endLoading())</script><div class="js-pjax"><script>if (!window.MathJax) {
  window.MathJax = {
    tex: {
      inlineMath: [ ['$','$'], ["\\(","\\)"]],
      tags: 'ams'
    },
    chtml: {
      scale: 1.2
    },
    options: {
      renderActions: {
        findScript: [10, doc => {
          for (const node of document.querySelectorAll('script[type^="math/tex"]')) {
            const display = !!node.type.match(/; *mode=display/)
            const math = new doc.options.MathItem(node.textContent, doc.inputJax[0], display)
            const text = document.createTextNode('')
            node.parentNode.replaceChild(text, node)
            math.start = {node: text, delim: '', n: 0}
            math.end = {node: text, delim: '', n: 0}
            doc.math.push(math)
          }
        }, ''],
        insertScript: [200, () => {
          document.querySelectorAll('mjx-container:not\([display]\)').forEach(node => {
            const target = node.parentNode
            if (target.nodeName.toLowerCase() === 'li') {
              target.parentNode.classList.add('has-jax')
            } else {
              target.classList.add('has-jax')
            }
          });
        }, '', false]
      }
    }
  }
  
  const script = document.createElement('script')
  script.src = 'https://fastly.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js'
  script.id = 'MathJax-script'
  script.async = true
  document.head.appendChild(script)
} else {
  MathJax.startup.document.state(0)
  MathJax.texReset()
  MathJax.typeset()
}</script><script>function loadValine () {
  function initValine () {
    const valine = new Valine(Object.assign({
      el: '#vcomment',
      appId: 'REc8eytE1gJDl3d8FkudLNlL-gzGzoHsz',
      appKey: 'gGO3y8I9oVlc4Cd5N1fizNPW',
      avatar: 'monsterid',
      serverURLs: '',
      emojiMaps: "",
      path: window.location.pathname,
      visitor: false
    }, null))
  }

  if (typeof Valine === 'function') initValine() 
  else getScript('https://fastly.jsdelivr.net/npm/valine/dist/Valine.min.js').then(initValine)
}

if ('Valine' === 'Valine' || !true) {
  if (true) btf.loadComment(document.getElementById('vcomment'),loadValine)
  else setTimeout(loadValine, 0)
} else {
  function loadOtherComment () {
    loadValine()
  }
}</script></div><script defer="defer" id="fluttering_ribbon" mobile="true" src="https://fastly.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-fluttering-ribbon.min.js"></script><script id="canvas_nest" defer="defer" color="255,0,0" opacity="0.7" zIndex="-1" count="99" mobile="false" src="https://fastly.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-nest.min.js"></script><script src="https://fastly.jsdelivr.net/npm/butterfly-extsrc@1/dist/activate-power-mode.min.js"></script><script>POWERMODE.colorful = true;
POWERMODE.shake = true;
POWERMODE.mobile = true;
document.body.addEventListener('input', POWERMODE);
</script><script id="click-heart" src="https://fastly.jsdelivr.net/npm/butterfly-extsrc@1/dist/click-heart.min.js" async="async" mobile="false"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>